]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
BackgroundCache: plug an Animation object leak
authorRui Matos <tiagomatos@gmail.com>
Mon, 27 Oct 2014 15:45:31 +0000 (16:45 +0100)
committerRui Matos <tiagomatos@gmail.com>
Mon, 27 Oct 2014 16:50:41 +0000 (17:50 +0100)
We need to return early in case the animation file is the same,
otherwise we'll create a new Animation object and leak the previous
one.

https://bugzilla.gnome.org/show_bug.cgi?id=739252

js/ui/background.js

index 81d186eb14718ee0d8805c509870256ce4b054f3..82928e7710445315c6fa1f50ee7177fea9bea5cf 100644 (file)
@@ -172,6 +172,7 @@ const BackgroundCache = new Lang.Class({
                 }));
                 GLib.Source.set_name_by_id(id, '[gnome-shell] params.onLoaded');
             }
+            return;
         }
 
         let animation = new Animation({ file: params.file });